home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Tools⁄Additions / MacUserProj / MacUser Projects / June / 2GenApp Hdr / AppGlobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-25  |  2.0 KB  |  71 lines  |  [TEXT/KAHL]

  1. /* *****************************************************************************
  2.     FILE:             AppGlobals.h
  3.     
  4.     DESCRIPTION:     Application global variables declaration and definitions
  5.  
  6.     AUTHOR:            Kurt W.G. Matthies
  7.         
  8.     Copyright © 1990 by Code of the West, Inc., All Rights Reserved.
  9.  
  10.     Revision History:
  11.     ==========================================================
  12.     4.24.90    -    June 1990 MacUser Release - multiple windows
  13.     3.30.90 -     May 1990 MacUser Release
  14.     ==========================================================
  15.  
  16.    ***************************************************************************** */
  17. #ifndef _AppGlobals_
  18. #define    _AppGlobals_
  19.  
  20. #ifdef _Main_Module_
  21. #define SCOPE /*GLOBAL*/
  22. #else
  23. #define SCOPE extern
  24. #endif
  25.  
  26. /* 
  27.     there's a trick here:
  28.     
  29.     if _Main_Module_ is defined, and it's only defined in Shell.c,
  30.     then SCOPE is a comment and the variables are defined.
  31.     
  32.     if _Main_Module_ is undefined, then SCOPE becomes the keyword
  33.     extern and these variables are declared.
  34.     
  35.     Thus, you can use this file in any file that needs to access 
  36.     the application's globals. There's no need for an "extern.h"
  37.     
  38. */
  39.     
  40. #include "AppConstants.h"
  41. #include "AppTypes.h"
  42.  
  43. #include <MenuMgr.h>
  44.  
  45. #include "Version.h"
  46.  
  47. #ifdef V2
  48. #include <OSUtil.h>
  49. #endif
  50.  
  51. SCOPE         MenuHandle             gDeskMenu,            /* application menu handles */
  52.                                 gFileMenu,
  53.                                 gEditMenu;
  54.  
  55. SCOPE        SysEnvRec            gSysEnv;            /* the current HW environment */
  56. SCOPE        Boolean                gHasWNE,            /* has Wait Next Event implemented */
  57.                                 gDevel;                /* in development */
  58.                                 
  59. SCOPE        Rect                gGrayRgnRect,        /* entire screen rect */
  60.                                 gScreenRect,        /* the main device screen rect */
  61.                                 gWindowRect;        /* default window rect */
  62.  
  63. SCOPE        short                gNumOpenDocs,        /* open document count */
  64.                                 gNextWindow;        /* next available untitled window # */
  65.  
  66. #undef _main_module
  67.  
  68. #endif
  69. /* ==================================  EOF  ====================================
  70.          Copryright © 1990 Code of the West, Inc.  All Rights Reserved
  71.    ============================================================================= */